<?php
defined('ANS') or die();

foreach ($Data->updateDB(false) as $query) {
	$key = md5($query);

	$queries[] = array(
		'query' => $query,
		'key' => $key,
		'status' => isset($executed[$key]) ? ($executed[$key]['error'] ? 'error' : 'executed') : 'not-executed'
	);

	unset($executed[$key]);
}

if ($executed) {
	foreach ($executed as $key => $query) {
		$queries[] = array(
			'query' => $query['query'],
			'key' => $key,
			'status' => $query['error'] ? 'error' : 'executed'
		);
	}
}
?>
